<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<body>

<!-- begin::chat block -->
<div class="row no-gutters chat-block" th:fragment="index(status)" th:if="${status} eq 577">
    <div class="col-md-3 app-sidebar">
        <a th:href="@{/visitor}">
            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left mr-3"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>
        </a>
        <div class="card">
            <div class="app-sidebar-menu">
                <div class="list-group list-group-flush">
                    <p class="list-group-item d-flex align-items-center">
                        <i data-feather="user" class="mr-2 width-15 height-15"></i>
                        姓名
                        <span class="small ml-auto" >[[${vschatvs.visitorname}]]</span>
                    </p>
                    <p  class="list-group-item d-flex align-items-center">
                        <i data-feather="map-pin" class="mr-2 width-15 height-15"></i>
                        ip
                        <span class="small ml-auto">[[${vschatvs.ip}]]</span>
                    </p>
                    <p  class="list-group-item d-flex align-items-center">
                        <i data-feather="send" class="mr-2 width-15 height-15"></i>
                        终端
                        <span class="small ml-auto">[[${vschatvs.terminal}]]</span>
                    </p>
                    <p  class="list-group-item d-flex align-items-center">
                        <i data-feather="globe" class="mr-2 width-15 height-15"></i>
                        浏览器
                        <span class="small ml-auto">[[${vschatvs.browser}]]</span>
                    </p>
                    <p  class="list-group-item d-flex align-items-center">
                        <i data-feather="monitor" class="mr-2 width-15 height-15"></i>
                        设备
                        <span class="small ml-auto">[[${vschatvs.device}]]</span>
                    </p>
                    <p  class="list-group-item d-flex align-items-center">
                        <i data-feather="calendar" class="mr-2 width-15 height-15"></i>
                        访问时间
                        <span class="small ml-auto" th:text="${#dates.format(vschatvs.visittime, 'yyyy-MM-dd HH:mm')}">[[}]]</span>
                    </p>
                </div>

                </div>

        </div>
    </div>
    <!-- begin::chat content -->
    <div class="col-lg-8 chat-content">

        <!-- begin::chat header -->
        <div class="chat-header border-bottom">
            <div class="d-flex align-items-center">
                <div class="pr-3">
                    <div class="avatar avatar-sm ">
                        <img src="assets/media/image/photo3.jpg" class="rounded-circle" >
                    </div>
                </div>
                <div>
                                        <h6 class="mb-1">[[${vschatvs.visitorname}]]</h6>
                    <div class="m-0 small text-success">
                                                <div th:text="${vschatvs.state}"></div>
                    </div>
                    <div class="ml-auto">
                    </div>
                    <ul class="nav align-items-center">
                        <li class="mr-4 d-sm-inline d-none">
                            <a href="#" title="Start Video Call" data-toggle="tooltip">
                                <i data-feather="video" class="width-18 height-18"></i>
                            </a>
                        </li>
                        <li class="mr-4 d-sm-inline d-none">
                            <a href="#" title="Start Voice Call" data-toggle="tooltip">
                                <i data-feather="phone-call" class="width-18 height-18"></i>
                            </a>
                        </li>
                        <li class="d-sm-inline d-none">
                            <a href="#" title="Add to Contact" data-toggle="tooltip">
                                <i data-feather="user-plus" class="width-18 height-18"></i>
                            </a>
                        </li>
                        <li class="ml-4 mobile-chat-close-btn">
                            <a href="#" class="btn btn-sm btn-danger">
                                <i data-feather="x" class="width-18 height-18"></i>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <!-- end::chat header -->

        <!-- begin::messages -->
        <div class="messages innerbox">
            <tr th:each="c, State : ${session.vscon}">
                <div shiro:hasPermission="announce" class=""th:class="${c.fromvisitor} ? 'message-item ' : 'message-item me' ">

                    <div class="message-item-content" style="width: 250px;">[[${c.content}]]</div>
                    <span class="time small text-muted font-italic">[[${c.vssendtime}]]</span>

                </div>
                <div shiro:lacksPermission="announce" class=""th:class="${c.fromvisitor} ? 'message-item me' : 'message-item ' ">

                    <div class="message-item-content" style="width: 250px;">[[${c.content}]]</div>
                    <span class="time small text-muted font-italic">[[${c.ccsendtime}]]</span>

                </div>
            </tr>
        </div>
        <!-- end::messages -->

        <!-- begin::chat footer -->
        <div class="chat-footer border-top">
            <form class="d-flex" action="/vschats/submit">
                <button class="btn btn-outline-light mr-2" type="button" title="Emoji"
                        data-toggle="tooltip">
                    <i data-feather="smile" class="width-15 height-15"></i>
                </button>
                <div class="flex-grow-1">
                    <input type="text" name="content" class="form-control" placeholder="Write your message">
                </div>
                <div class="chat-footer-buttons d-flex">
                    <button class="btn btn-primary" type="submit">
                        <i data-feather="send" class="width-15 height-15"></i>
                    </button>
                </div>
            </form>
        </div>
        <!-- end::chat footer -->

    </div>
    <!-- begin::chat content -->


</div>
<!-- begin::chat block -->

</body>
</html>